When image data obtained by reading a document in an image reading apparatus which carries a document is printed out by a printer or is displayed to a display, line noise images along a document carrying direction (sub scanning direction) sometimes appear in an image. The line noise images are caused by foreign matters (such as dust or paper dust from document paper which is carried) adhered to a glass serving as a scanner platen surface or by scratches on the glass. Such line noise images appear as black line noise on a background part which is a blank part, or appear as white line noise on an image part read from the document. Therefore, for an image forming apparatus, such line noise images are desired to be eliminated because the image forming apparatus is required to provide image data which is the same as the image of the document.
For example, Patent Document 1 proposes a technique relating to removal of a line noise image. Patent Document 1 discloses processing in which (A) a location of line noise caused by a foreign matter is detected and then (B) a pixel value of a pixel which (i) is determined to be line noise and (ii) has low possibility that an image of a document appears is replaced with a pixel value based on pixel values of peripheral pixels. By carrying out such processing, a line noise image can be eliminated or less visible. This prevents reduction in image quality.